import request from '#/utils/requestAbort.js';

// 省份-交易中心-场站（数据权限）
export async function queryMarketList(menuCode) {
  return request(`/power/dataPower/common/${menuCode}/t_station`, {
    method: 'GET',
  });
}

// 查询功率预测曲线
export async function postQueryPowerForecastCurve(params) {
  return request('/disclosure/powerForecast/queryPowerForecastCurve', {
    method: 'POST',
    data: params,
  });
}

// 查询检修计划列表
export async function postQueryTendingPlanList(params) {
  return request('/disclosure/powerForecast/queryTendingPlanList', {
    method: 'POST',
    data: params,
  });
}

// 新增/编辑计划表
export async function postSaveTendingPlan(params) {
  return request('/disclosure/powerForecast/saveTendingPlan', {
    method: 'POST',
    data: params,
  });
}

// 查询统计全部检修计划数量
export async function postQueryAllTendingPlan(params) {
  return request('/disclosure/powerForecast/queryAllTendingPlan', {
    method: 'POST',
    data: params,
  });
}

// 查询交易单元装机容量
export async function getQueryCapacityByStationId(stationId) {
  return request(`/disclosure/powerForecast/queryCapacityByStationId/${stationId}`, {
    method: 'GET',
  });
}

// 获取电量预测影响数据
export async function getPlanLogList(params) {
  const { stationId, current } = params;
  return request('/disclosure/powerForecast/getPlanLogList', {
    method: 'GET',
    params: { stationId, current },
  });
}

// 获取电量预测影响数据
export async function postUpdatePlanState(params) {
  return request('/disclosure/powerForecast/updatePlanState', {
    method: 'POST',
    data: params,
  });
}

// 功率预测评价
// 偏差数据查询
export async function postDeviationData(params) {
  return request('/predictive/forecastEvaluation/deviationData', {
    method: 'POST',
    data: params,
  });
}
